//
//  PickerValueCell.h
//  iShop
//
//  Created by svp on 20/12/2011.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@class TitleTextfieldCell;

@protocol TitleTextfieldCellDelegate<NSObject>

@optional

-(void) textFieldDidBeginEditing:(UITableViewCell*)cell;
-(void) textFieldDidEndEditing:(UITableViewCell*)cell;

@end


@interface TitleTextfieldCell : UITableViewCell <UITextFieldDelegate, UIPickerViewDelegate, UIPickerViewDataSource>{
	UITextField *_textField;
	UILabel *_titleLabel;
	id<TitleTextfieldCellDelegate> _delegate;
	UIPickerView *_pickerView;
	NSArray *_pickerArray;
	int _selectedIndex;
}

@property(nonatomic, retain) IBOutlet UITextField *textField;
@property(nonatomic, retain) IBOutlet UILabel *titleLabel;
@property(nonatomic, assign) id<TitleTextfieldCellDelegate> delegate;

@end

@interface TitleTextfieldCell (PickerValue)


-(BOOL) initPickerWithArray:(NSArray*) array;
-(NSString*) cellValue;
-(void) setPickerSelectAt:(NSString*)value;

@end
